package com.xy.learn.springlearn.advice;

import com.xy.learn.springlearn.exception.NotAllowException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class NotAllowExceptionAdvice {

    @ExceptionHandler(NotAllowException.class)
    @ResponseBody
    public String handle() {
        return "403";
    }
}
